package server

import (
	"golang.org/x/net/context"
	pb "grpc/helloworldgrpc/proto"
	"fmt"
)

type helloService struct {
}

func NewHelloService() *helloService {
	return &helloService{}
}

func (h helloService) SayHelloWorld(ctx context.Context, r *pb.HelloWorldRequest) (*pb.HelloWorldResponse, error) {
	fmt.Println(r.Referer)

	//这里返回一个数据正常与否的提示码
	return &pb.HelloWorldResponse{
		Message: r.Referer + "haha",
	}, nil
}

